package com.situ.blog.controller;


import com.situ.blog.pojo.entity.Type;
import com.situ.blog.service.ITypeService;
import com.situ.blog.util.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author Gao
 * @since 2024-09-25
 */
@RestController
@RequestMapping("/type")
public class TypeController {

    @Autowired
    private ITypeService typeService;

    @GetMapping("/selectAll")
    public Result selectAll() {
        List<Type> list = typeService.list();
        return Result.ok(list);
    }
}

